#!/usr/bin/python
###################### fact #######################
#s = input('please input a num:')
#num = int(s)
#def fact(n):
#	if n == 1:
#		return 1
#	return n * fact(n - 1)
#print('result: ',fact(num))
###################### fact #######################
a = input('please input the first num:')
b = input('please input second num:')
num_one = int(a)
num_two = int(b)
def fact_iter(num_one, num_two):
	if num_one == 1:
		return num_two
	return fact_iter(num_one - 1, num_one * num_two)
print(fact_iter(num_one, num_two))
